//
//  Definition.h
//  WinesMall
//
//  Created by Isaac on 17/8/24.
//  Copyright © 2017年 Isaac. All rights reserved.
//

#ifndef Definition_h
#define Definition_h



#define PHONEVERSION    [[UIDevice currentDevice] systemVersion]

#define userToken  [[WSMTools wsmTool] getToken]

#define SERVICE_NAME @"SERVICE_NAME"

#define NavBar_HEIGHT  ((SCREEN_HEIGHT == 812) ? 88.0 : 64.0)
#define UI_tabBar_Height  ((SCREEN_HEIGHT == 812) ? 83.0 : 49.0)

#define UI_Y NavBar_HEIGHT  // ((SCREEN_HEIGHT == 812) ? NavBar_HEIGHT : 0)
#define UI_X_Height ((SCREEN_HEIGHT == 812) ? 171.0 : 113.0)  // ((SCREEN_HEIGHT == 812) ? NavBar_HEIGHT+UI_tabBar_Height : 0)


//各设备相对于6p的大小系数
#define SCALEPHONE6P         414.0/414.0
#define SCALEPHONE6          375.0/414.0
#define SCALEPHONE5          320.0/414.0

#define LEFTSPACE 15
#define SCREEN_WIDTH [[UIScreen mainScreen] bounds].size.width
#define SCREEN_HEIGHT [[UIScreen mainScreen] bounds].size.height

//适配
#define XMRECT6(rect) CGRectMake(rect.origin.x*self6WidthRate, rect.origin.y*self6HeightRate, rect.size.width*self6WidthRate, rect.size.height*self6HeightRate)
#define self6WidthRate [UIScreen mainScreen].bounds.size.width/375.0
#define self6HeightRate [UIScreen mainScreen].bounds.size.height/667.0

//以什么尺寸为标准，写什么尺寸。   按比例设置frame
#define N_CGRectMake(x,y,w,h) CGRectMake(x*[UIScreen mainScreen].bounds.size.width/320., y*[UIScreen mainScreen].bounds.size.height/568., w*[UIScreen mainScreen].bounds.size.width/320., h*[UIScreen mainScreen].bounds.size.height/568.)

#define KIsiPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
//获取view的宽度、高度、x坐标、y坐标
#define VW(view) (view.frame.size.width)
#define VH(view) (view.frame.size.height)
#define VX(view) (view.frame.origin.x)
#define VY(view) (view.frame.origin.y)


#define FONT11 [UIFont adjustFont:[UIFont systemFontOfSize:11]]
#define FONT12 [UIFont adjustFont:[UIFont systemFontOfSize:12]]
#define FONT13 [UIFont adjustFont:[UIFont systemFontOfSize:13]]
#define FONT14 [UIFont adjustFont:[UIFont systemFontOfSize:14]]
#define FONT15 [UIFont adjustFont:[UIFont systemFontOfSize:15]]
#define FONT16 [UIFont adjustFont:[UIFont systemFontOfSize:16]]
#define FONT17 [UIFont adjustFont:[UIFont systemFontOfSize:17]]
#define FONT18 [UIFont adjustFont:[UIFont systemFontOfSize:18]]


#define IS_IPHONE_6 ([[UIScreen mainScreen] bounds].size.height == 667.0f)
#define IS_IPHONE_6_PLUS ([[UIScreen mainScreen] bounds].size.height == 736.0f)
// 这里设置iPhone6放大的字号数  及iPhone6Plus放大的字号数
#define IPHONE5_INCREMENT 2
#define IPHONE6PLUS_INCREMENT 0.3



#define kWhiteColor [UIColor whiteColor]
#define kMainColor [UIColor colorWithHex:@"#0F0F0F"]
#define kBackGColor [UIColor colorWithHex:@"#F6F6F6"]
#define kLineColor [UIColor colorWithHex:@"#E6E6E6"]
#define kAssistColor_TWO [UIColor colorWithHex:@"#00d2a3"]
#define kAssistColor_ONE [UIColor colorWithHex:@"#fea257"]
#define kAssistColor_THIRD [UIColor colorWithHex:@"#45b2ff"]
#define kAssistColor_FOUR [UIColor colorWithHex:@"#76c5fc"]


#define kRedColor [UIColor colorWithHex:@"#EC3F68"]  //红色
#define kBlueColor [UIColor colorWithHex:@"#21B1F4"]  //浅蓝色


#define kPriceColor [UIColor colorWithHex:@"#FC0505"]
#define kAssistColor [UIColor colorWithHex:@"#E59C09"]  //橘黄色价格



#define kTextColorOne [UIColor colorWithHex:@"#131313"]
#define kTextColorTwo [UIColor colorWithHex:@"#222222"]
#define kTextColorThree [UIColor colorWithHex:@"#666666"]
#define kTextColorFour [UIColor colorWithHex:@"#888888"]

#endif /* Definition_h */
